import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
  // { path: '/', redirect: '/main' },
  {
    path: '/',
    name: 'main',
    component: () => import('@/views/main.vue'),
    children:[
      {  
        path: '',
        name: 'eChart',
        meta:{
          isShow:true,
          title:'个人优势'
        },
        component: () => import('@/views/chart.vue')
      },
      {  
        path: '/advantage',
        name: 'advantage',
        meta:{
          isShow:true,
          title:'个人优势'
        },
        component: () => import('@/views/advantage.vue')
      },
      {  
        path: '/company',
        name: 'company',
        meta:{
          isShow:true,
          title:'工作经历'
        },
        component: () => import('@/views/company.vue')
      },
      {  
        path: '/project',
        name: 'project',
        meta:{
          isShow:true,
          title:'项目经历'
        },
        component: () => import('@/views/project.vue'),
      },
      {  
        path: '/project/:id',
        name: 'projectdisplay',
        component: () => import('@/views/projectdisplay.vue'),
      },
      {  
        path: '/education',
        name: 'education',
        meta:{
          isShow:true,
          title:'教育经历'
        },
        component: () => import('@/views/education.vue')
      },
      {  
        path: '/certificate',
        name: 'certificate',
        meta:{
          isShow:true,
          title:'资格证书'
        },
        component: () => import('@/views/certificate.vue')
      },
    ]
  },
  {  
    path: '/movie',
    name: 'movie',
    component: () => import('@/views/movie.vue'),
    children: [
      // { path: '/', redirect: '/hot' },
      // {path:'',component:Movie,name:'Movie'},
      { path: '', component: () => import('@/views/movie/hot.vue'), name: 'hoT', meta: { isRecord: true, top: 0 } },
      { path: 'new', component: () => import('@/views/movie/new.vue'), name: 'neW', meta: { isRecord: true, top: 0 } },
      { path: 'more', component: () => import('@/views/movie/more.vue'), name: 'morE', meta: { isRecord: true, top: 0 } }
    ],
  },
  {  
    path: '/goods',
    name: 'goods',
    component: () => import('@/views/goods.vue')
  }
  
  
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
